package com.ccys.db.mapper;

import com.ccys.db.entity.TblBookingMedicalService;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

/**
* Created by Mybatis Generator on 2023/12/27
*/
public interface TblBookingMedicalServiceMapper extends Mapper<TblBookingMedicalService>, MySqlMapper<TblBookingMedicalService> {
    void deleteByBookingId(@Param("bookingId") String bookingId);

    Integer findCountByBookingIdAndInServiceId(@Param("bookingId") String bookingId);

    void updateDelFlagTrueByBookingId(@Param("bookingId") String bookingId);

    void updateBookingPackageIdByBookingId(@Param("bookingId") String bookingId);

    /**
     * 这个方法根据bookingId将符合的数据的status修改为3 并且将show修改为1
     *
     * @param bookingId bookingId
     */
    void updateStatusThreeAndShowTrueByBookingId(@Param("bookingId") String bookingId);

    /**
     * 根据bookingId和serviceType查询count数量
     *
     * @param bookingId booking
     * @param serviceType type
     * @return
     */
    Integer findCountByBookingIdAndByServiceType(@Param("bookingId") String bookingId,@Param("serviceType") Integer serviceType);
}